package com.wjh.graduation.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 分组
 * </p>
 *
 * @author Wu Jiahong
 * @since 2022-01-25
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel(value = "Groups对象", description = "分组")
public class Groups {

	@ApiModelProperty("分组id")
	@TableId(value = "group_id", type = IdType.AUTO)
	private Integer groupId;

	@ApiModelProperty("用户id")
	@NotNull
	private Integer userId;

	@NotBlank
	@ApiModelProperty("分组名称")
	private String name;

	public static final String GROUPID = "groupId";

	public static final String USERID = "userId";

	public static final String NAME = "name";

	public Groups(Integer userId, String name) {
		this.userId = userId;
		this.name = name;
	}

	public Groups() {

	}

	@Override
	public String toString() {
		return "Groups{" +
				"groupId=" + groupId +
				", userId=" + userId +
				", name='" + name + '\'' +
				'}';
	}
}
